package cn.kuick.iplocation.factory_method_model;

/**
 * Created by Administrator on 2016/11/30.
 */
public class ConcreteFactory  extends Factory{
    public <T extends ProductIf> T createProduct(Class<T> c){
        T product = null;

        try {
            product = (T) Class.forName(c.getName()).newInstance();
        }catch (Exception e){
            e.printStackTrace();
        }

        return product;
    }
}
